﻿using System.Threading.Tasks;

namespace Sidvall.WorkItemManager.Data.Entity.Model
{
    public sealed partial class StorageManager : global::Sidvall.Data.Entity.StorageManagerDbContextBase<StorageManager, global::Sidvall.WorkItemManager.Data.Entity.Model.WorkItemManagerEntities>, global::Sidvall.Data.IStorageManager
    {
        #region DeleteItemsAsync

        public async Task DeleteItemsAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkerField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemTypeField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemWorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.DeleteItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, global::Sidvall.Data.DeleteCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkRetryPolicyField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region ExecuteAsync

        public async Task ExecuteAsync(global::Sidvall.Business.DataPortalContext<global::Sidvall.Data.CommandCriteria, global::Sidvall.Data.CommandCriteria> dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.ExecuteAsync(this, dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region GetItemAsync

        public async Task GetItemAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkCondition, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkConditionField, global::Sidvall.WorkItemManager.Data.Relations.WorkConditionRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorker, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkerField, global::Sidvall.WorkItemManager.Data.Relations.WorkerRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItem, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemLog, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemLogField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemLogRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensor, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemSensorRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorLogField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemSensorLogRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemType, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemTypeField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemTypeRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemWorkConditionField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemWorkConditionRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.GetItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy, global::Sidvall.Data.FetchCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkRetryPolicyField, global::Sidvall.WorkItemManager.Data.Relations.WorkRetryPolicyRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region GetItemCountAsync

        public async Task GetItemCountAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkerField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemTypeField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemWorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.GetItemCountAsync(this, (global::Sidvall.Business.DataPortalContext<long, global::Sidvall.Data.FetchCountCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkRetryPolicyField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region GetItemsAsync

        public async Task GetItemsAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkCondition, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkConditionField, global::Sidvall.WorkItemManager.Data.Relations.WorkConditionRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorker, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkerField, global::Sidvall.WorkItemManager.Data.Relations.WorkerRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItem, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemLog, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemLogField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemLogRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensor, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemSensorRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorLogField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemSensorLogRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemType, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemTypeField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemTypeRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkItemWorkConditionField, global::Sidvall.WorkItemManager.Data.Relations.WorkItemWorkConditionRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.GetItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy, global::Sidvall.Data.FetchListCriteria<global::Sidvall.WorkItemManager.Data.Fields.WorkRetryPolicyField, global::Sidvall.WorkItemManager.Data.Relations.WorkRetryPolicyRelation>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region NewItemAsync

        public async Task NewItemAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkCondition, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorker, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItem, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemLog, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensor, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemType, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.NewItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region NewItemsAsync

        public async Task NewItemsAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkCondition, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorker, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItem, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemLog, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensor, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemType, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.NewItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy, global::Sidvall.Data.CreateCriteria>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region SaveItemAsync

        public async Task SaveItemAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkCondition, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkCondition>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorker, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorker>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItem, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkItem>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemLog, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkItemLog>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensor, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensor>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemType, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkItemType>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.SaveItemAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy, Sidvall.Data.SaveContext<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region SaveItemsAsync

        public async Task SaveItemsAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkCondition, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkCondition>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorker, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorker>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItem, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkItem>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemLog, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkItemLog>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensor, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkItemSensor>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkItemSensorLog>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemType, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkItemType>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkItemWorkCondition>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.SaveItemsAsync(this, (global::Sidvall.Business.DataPortalContext<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy, Sidvall.Data.SaveContext<Sidvall.Data.IDataRowProvider<global::Sidvall.WorkItemManager.Data.IWorkRetryPolicy>>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region UpdateItemAsync

        public async Task UpdateItemAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkerField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemTypeField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemWorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.UpdateItemAsync(this, (global::Sidvall.Business.DataPortalContext<bool, Sidvall.Data.UpdateItemContext<global::Sidvall.WorkItemManager.Data.Fields.WorkRetryPolicyField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        #region UpdateItemsAsync

        public async Task UpdateItemsAsync(global::Sidvall.Business.IDataPortalContext dataPortalContext)
        {
            switch (dataPortalContext.Resource)
            {
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkConditionManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.Worker:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkerManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkerField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItem:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemLogManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensor:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemSensorLog:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemSensorLogManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemSensorLogField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemType:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemTypeManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemTypeField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkItemWorkCondition:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkItemWorkConditionManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkItemWorkConditionField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                case global::Sidvall.WorkItemManager.Data.Model.DomainObjects.WorkRetryPolicy:
                    await Sidvall.WorkItemManager.Data.Entity.Model.StorageManagers.WorkRetryPolicyManager.UpdateItemsAsync(this, (global::Sidvall.Business.DataPortalContext<int, Sidvall.Data.UpdateItemsContext<global::Sidvall.WorkItemManager.Data.Fields.WorkRetryPolicyField>>)dataPortalContext).ConfigureAwait(false);
                    break;
                default:
                    break;
            }
        }

        #endregion
        public static global::Sidvall.WorkItemManager.Data.Entity.Model.StorageManager GetStorageManager()
        {
            return Sidvall.Data.Entity.StorageManagerDbContextBase<StorageManager, global::Sidvall.WorkItemManager.Data.Entity.Model.WorkItemManagerEntities>.GetManager();
        }
        public static global::Sidvall.WorkItemManager.Data.Entity.Model.StorageManager GetStorageManager(string nameOrConnectionString)
        {
            return Sidvall.Data.Entity.StorageManagerDbContextBase<StorageManager, global::Sidvall.WorkItemManager.Data.Entity.Model.WorkItemManagerEntities>.GetManager(nameOrConnectionString);
        }
        private StorageManager()
        {
        }
    }
}